cd ${work}5_reg_analysis

local ylist		"exp_status log_vrd_exp_exsmall"
local felist	`" "IDY FD FY" "'
local wlist		`" "" "'

use temp\regsample_idt, clear

gen x_itt = tdcinitiative_2
lab var x_itt "Policy Effect"

eststo clear
local mtitles
local n=1

foreach y of local ylist {
local nfe=1	
foreach fe of local felist {
	
	local w : word `nfe' of `wlist'
	
	eststo est1: reghdfe `y' x_itt `w', a(`fe') vce(cl F) nosamp
	local N = e(N)
	
	eststo stacked_`n' : appendmodels est1
	eststo drop est*
	qui estadd scalar N `N'
	qui estadd local FE `fe'
	if "`w'"!=""	qui estadd local SC "Yes"
	if "`w'"==""	qui estadd local SC "No"
	local mtitles `mtitles' "`:var lab `y''"
		
	local ++n
	local ++nfe
	
}	
}
	
esttab using output\table_a14.tex, replace booktabs se label ///
	title("Policy Evaluation") star(* 0.1 ** 0.05 *** 0.01) mtitles(`mtitles') keep(x_*) ///
	stats(N FE , labels("Observations" "Fixed Effects") fmt(%10.0fc ""))